#ifndef __MYPWM_H
#define __MYPWM_H


#include "main.h"

void StartMotor(uint8_t dir, uint16_t duty);
void UpdateMos_CW(uint8_t hall_value, uint16_t duty , uint8_t motor_dir);
//void UpdateMos_CW(uint8_t hall_value, uint16_t duty);
//void UpdateMos_CCW(uint8_t hall_value, uint16_t duty);
void TIM_OCMode_Set(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t OCMode);
void CW_Start_Once(uint16_t duty);
void CCW_Start_Once(uint16_t duty);
void PWM_Start_ALL(void);
void PWM_Stop_ALL(void);
void StopMotor(void);
void Fast_Stop_Motor(uint16_t duty);
void Brake_Stop_Motor(void);
#endif

